import {defineStore} from "pinia";

export const useAppStore = defineStore("icesoft-app", {

    state() {
        return {
            keyId: '',
            publicKey: ''
        }
    },
    getters: {
        getKeyId(state) {
            return state.keyId
        },
        getPublicKey(state) {
            return state.publicKey
        },
        getData(state){
            return{
                keyId:state.keyId,
                publicKey:state.publicKey,
            }
        }
    },
    actions: {
        setPublicKey(data: { keyId: string, publicKey: string }) {
            this.keyId = data.keyId;
            this.publicKey = data.publicKey
        }
    }
})
